unit Modulo;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Db, DBTables;

type
  TDMEscola = class(TDataModule)
    DSUsuario: TDataSource;
    DSGrupo: TDataSource;
    DSuser: TDataSource;
    Quser: TQuery;
    QUsuario: TQuery;
    QUsuarioCodigo: TIntegerField;
    QUsuarioUsuario: TStringField;
    QUsuarioSenha: TStringField;
    QUsuarioGrupo: TStringField;
    QuserCodigo: TIntegerField;
    QuserUsuario: TStringField;
    QuserSenha: TStringField;
    QuserGrupo: TStringField;
    DSempresa: TDataSource;
    DSQclientes: TDataSource;
    Tempresa: TTable;
    TempresaCodigo: TAutoIncField;
    TempresaRazao: TStringField;
    TempresaFantasia: TStringField;
    TempresaCGC: TStringField;
    TempresaEndereco: TStringField;
    TempresaCidade: TStringField;
    TempresaUF: TStringField;
    TempresaTelefone1: TStringField;
    TempresaFax: TStringField;
    TempresaEmail: TStringField;
    TempresaHomepage: TStringField;
    TempresaLogo: TStringField;
    QClientes: TQuery;
    DSTarifas: TDataSource;
    DSQtestetarifa: TDataSource;
    Qtestetarifa: TQuery;
    QtestetarifaCodigo: TIntegerField;
    QtestetarifaDiaSemana: TStringField;
    QtestetarifaHoraini: TTimeField;
    QtestetarifaHorafim: TTimeField;
    QtestetarifaTarifaacada: TTimeField;
    QtestetarifaCobrar: TCurrencyField;
    TTarifas: TQuery;
    TTarifasCodigo: TIntegerField;
    TTarifasDiaSemana: TStringField;
    TTarifasHoraini: TTimeField;
    TTarifasHorafim: TTimeField;
    TTarifasTarifaacada: TTimeField;
    TTarifasCobrar: TFloatField;
    DSgravatarifa: TDataSource;
    Qgravatarifa: TQuery;
    QgravatarifaCodigo: TIntegerField;
    QgravatarifaDiaSemana: TStringField;
    QgravatarifaHoraini: TTimeField;
    QgravatarifaHorafim: TTimeField;
    QgravatarifaTarifaacada: TTimeField;
    QgravatarifaCobrar: TFloatField;
    DSQip: TDataSource;
    Qip: TQuery;
    DSQconsultarip: TDataSource;
    Qconsultarip: TQuery;
    QconsultaripCodigo: TIntegerField;
    QconsultaripPc1: TStringField;
    QconsultaripIp1: TStringField;
    QconsultaripPc2: TStringField;
    QconsultaripIp2: TStringField;
    QconsultaripPc3: TStringField;
    QconsultaripIp3: TStringField;
    QconsultaripPc4: TStringField;
    QconsultaripIp4: TStringField;
    QconsultaripPc5: TStringField;
    QconsultaripIp5: TStringField;
    QconsultaripPc6: TStringField;
    QconsultaripIp6: TStringField;
    QconsultaripPc7: TStringField;
    QconsultaripIp7: TStringField;
    QconsultaripPc8: TStringField;
    QconsultaripIp8: TStringField;
    QconsultaripPc9: TStringField;
    QconsultaripIp9: TStringField;
    QconsultaripPc10: TStringField;
    QconsultaripIp10: TStringField;
    DSQProdutos: TDataSource;
    Qprodutos: TQuery;
    QprodutosCodigo: TIntegerField;
    QprodutosDescricao: TStringField;
    QprodutosServico: TBooleanField;
    QprodutosFornecedor: TStringField;
    QprodutosPreco_Venda: TCurrencyField;
    QprodutosEstoque_Atual: TFloatField;
    QprodutosEstoque_Mim: TFloatField;
    DSQconsultapro: TDataSource;
    Qconsultapro: TQuery;
    QconsultaproCodigo: TIntegerField;
    QconsultaproDescricao: TStringField;
    QconsultaproServico: TBooleanField;
    QconsultaproFornecedor: TStringField;
    QconsultaproPreco_Venda: TCurrencyField;
    QconsultaproEstoque_Atual: TFloatField;
    QconsultaproEstoque_Mim: TFloatField;
    DSQvenda: TDataSource;
    Qvenda: TQuery;
    QvendaCodigo: TAutoIncField;
    QvendaTipo_venda: TStringField;
    QvendaCliente: TStringField;
    QvendaData_venda: TDateField;
    QvendaTotal: TCurrencyField;
    QvendaDesconto: TFloatField;
    QvendaTota_final: TCurrencyField;
    QvendaPago: TBooleanField;
    DSQconsultacli: TDataSource;
    Qconsultacli: TQuery;
    QconsultacliCodigo: TIntegerField;
    QconsultacliNome: TStringField;
    QconsultacliNickName: TStringField;
    QconsultacliData_ncto: TDateField;
    QconsultacliRG: TStringField;
    QconsultacliResponsavel: TStringField;
    QconsultacliRG_resp: TStringField;
    QconsultacliGrupo: TStringField;
    QconsultacliEndereco: TStringField;
    QconsultacliComplementp: TStringField;
    QconsultacliBairro: TStringField;
    QconsultacliCidade: TStringField;
    QconsultacliUF: TStringField;
    QconsultacliCEP: TStringField;
    QconsultacliTelefone1: TStringField;
    QconsultacliTelefone2: TStringField;
    QconsultacliEmail: TStringField;
    QconsultacliPagina: TStringField;
    QconsultacliIcq: TStringField;
    QconsultacliOutros_internet: TStringField;
    QconsultacliConta: TIntegerField;
    DSQdetalhesven: TDataSource;
    Qdetalhesven: TQuery;
    QdetalhesvenCodigo: TIntegerField;
    QdetalhesvenProduto: TStringField;
    QdetalhesvenQuatidade: TFloatField;
    QdetalhesvenPreco_unit: TCurrencyField;
    QdetalhesvenPreco_total: TCurrencyField;
    QdetalhesvenCod_Cli: TIntegerField;
    DSQacesso: TDataSource;
    Qacesso: TQuery;
    QacessoCodigo: TIntegerField;
    QacessoCliente: TStringField;
    QacessoData: TDateField;
    QacessoTempo: TStringField;
    QacessoValor: TCurrencyField;
    QacessoDesconto: TFloatField;
    QacessoTotal_acesso: TCurrencyField;
    QacessoTerminal: TStringField;
    QacessoPago: TBooleanField;
    DSQsumvenda: TDataSource;
    Qsumvenda: TQuery;
    DSQsumacesso: TDataSource;
    Qsumacesso: TQuery;
    QsumacessoSUMOFTotal_acesso: TCurrencyField;
    QdetalhesvenPago: TBooleanField;
    QsumvendaSUMOFpreco_total: TCurrencyField;
    DSQretiradas: TDataSource;
    Qretiradas: TQuery;
    DSQreforcos: TDataSource;
    Qreforcos: TQuery;
    DSQsomavenda: TDataSource;
    Qsomavenda: TQuery;
    DSQsumretiradas: TDataSource;
    Qsumretiradas: TQuery;
    DSQsumreforcos: TDataSource;
    QsumretiradasSUMOFvalor: TCurrencyField;
    Qsumreforcos: TQuery;
    QsumreforcosSUMOFvalor: TCurrencyField;
    QsomavendaSUMOFtota_final: TCurrencyField;
    DSQfechamento: TDataSource;
    Qfechamento: TQuery;
    QfechamentoCodigo: TAutoIncField;
    QfechamentoData: TDateField;
    QfechamentoSaldoanterior: TCurrencyField;
    QfechamentoTotaldia: TCurrencyField;
    QfechamentoReforcos: TCurrencyField;
    QfechamentoProdutos: TCurrencyField;
    QfechamentoAcessos: TCurrencyField;
    QfechamentoRetiradas: TCurrencyField;
    DSQdata: TDataSource;
    Qdata: TQuery;
    QdataCodigo: TIntegerField;
    QdataData: TDateField;
    QdataSaldoanterior: TCurrencyField;
    QdataTotaldia: TCurrencyField;
    QdataReforcos: TCurrencyField;
    QdataProdutos: TCurrencyField;
    QdataAcessos: TCurrencyField;
    QdataRetiradas: TCurrencyField;
    QfechamentoSaldoAtual: TCurrencyField;
    QdataSaldoAtual: TCurrencyField;
    QdetalhesvenDataPGTO: TDateField;
    Tgrupo: TQuery;
    TgrupoCodigo: TIntegerField;
    TgrupoGrupo: TStringField;
    TgrupoDesconto: TFloatField;
    TgrupoCliente: TIntegerField;
    QacessoDataPGTo: TDateField;
    QClientesCodigo: TAutoIncField;
    QClientesNome: TStringField;
    QClientesNickName: TStringField;
    QClientesData_ncto: TDateField;
    QClientesRG: TStringField;
    QClientesResponsavel: TStringField;
    QClientesRG_resp: TStringField;
    QClientesGrupo: TStringField;
    QClientesEndereco: TStringField;
    QClientesComplementp: TStringField;
    QClientesBairro: TStringField;
    QClientesCidade: TStringField;
    QClientesUF: TStringField;
    QClientesCEP: TStringField;
    QClientesTelefone1: TStringField;
    QClientesTelefone2: TStringField;
    QClientesEmail: TStringField;
    QClientesPagina: TStringField;
    QClientesIcq: TStringField;
    QClientesOutros_internet: TStringField;
    QClientesConta: TIntegerField;
    DSQsuport: TDataSource;
    Qsuport: TQuery;
    QsuportCodigo: TIntegerField;
    QsuportCod_cli: TIntegerField;
    QsuportProduto: TStringField;
    QsuportQuantidade: TFloatField;
    QsuportPreco_unit: TCurrencyField;
    QsuportPreco_total: TCurrencyField;
    QsuportPago: TBooleanField;
    QsuportDataPGTO: TDateField;
    DSQsumsuport: TDataSource;
    Qsumsuport: TQuery;
    QsumsuportSUMOFpreco_unit: TCurrencyField;
    DSQniver: TDataSource;
    Qniver: TQuery;
    QniverCodigo: TIntegerField;
    QniverNome: TStringField;
    QniverNickName: TStringField;
    QniverData_ncto: TDateField;
    QniverRG: TStringField;
    QniverResponsavel: TStringField;
    QniverRG_resp: TStringField;
    QniverGrupo: TStringField;
    QniverEndereco: TStringField;
    QniverComplementp: TStringField;
    QniverBairro: TStringField;
    QniverCidade: TStringField;
    QniverUF: TStringField;
    QniverCEP: TStringField;
    QniverTelefone1: TStringField;
    QniverTelefone2: TStringField;
    QniverEmail: TStringField;
    QniverPagina: TStringField;
    QniverIcq: TStringField;
    QniverOutros_internet: TStringField;
    QniverConta: TIntegerField;
    QipCodigo: TAutoIncField;
    QipPc1: TStringField;
    QipIp1: TStringField;
    QipPc2: TStringField;
    QipIp2: TStringField;
    QipPc3: TStringField;
    QipIp3: TStringField;
    QipPc4: TStringField;
    QipIp4: TStringField;
    QipPc5: TStringField;
    QipIp5: TStringField;
    QipPc6: TStringField;
    QipIp6: TStringField;
    QipPc7: TStringField;
    QipIp7: TStringField;
    QipPc8: TStringField;
    QipIp8: TStringField;
    QipPc9: TStringField;
    QipIp9: TStringField;
    QipPc10: TStringField;
    QipIp10: TStringField;
    QipPc11: TStringField;
    QipIp11: TStringField;
    QipPc12: TStringField;
    QipIp12: TStringField;
    QipPc13: TStringField;
    QipIp13: TStringField;
    QipPc14: TStringField;
    QipIp14: TStringField;
    QipPc15: TStringField;
    QipIp15: TStringField;
    QipPc16: TStringField;
    QipIp16: TStringField;
    QipPc17: TStringField;
    QipIp17: TStringField;
    QipPc18: TStringField;
    QipIp18: TStringField;
    QipPc19: TStringField;
    QipIp19: TStringField;
    QipPc20: TStringField;
    QipIp20: TStringField;
    QipPc21: TStringField;
    QipIp21: TStringField;
    QipPc22: TStringField;
    QipIp22: TStringField;
    QipPc23: TStringField;
    QipIp23: TStringField;
    QipPc24: TStringField;
    QipIp24: TStringField;
    QretiradasCodigo: TAutoIncField;
    QretiradasData: TDateField;
    QretiradasHora: TTimeField;
    QretiradasValor: TCurrencyField;
    QretiradasObs: TStringField;
    QreforcosCodigo: TAutoIncField;
    QreforcosData: TDateField;
    QreforcosHora: TTimeField;
    QreforcosValor: TCurrencyField;
    QreforcosObs: TStringField;
    DSQconsultaacesso: TDataSource;
    Qconsultaacesso: TQuery;
    QconsultaacessoCodigo: TIntegerField;
    QconsultaacessoCliente: TStringField;
    QconsultaacessoData: TDateField;
    QconsultaacessoTempo: TStringField;
    QconsultaacessoValor: TCurrencyField;
    QconsultaacessoDesconto: TFloatField;
    QconsultaacessoTotal_acesso: TCurrencyField;
    QconsultaacessoTerminal: TStringField;
    QconsultaacessoPago: TBooleanField;
    QconsultaacessoDataPGTo: TDateField;
    DSback: TDataSource;
    Qback: TQuery;
    QbackCodigo: TAutoIncField;
    QbackPc1: TStringField;
    QbackPc2: TStringField;
    QbackPc3: TStringField;
    QbackPc4: TStringField;
    QbackPc5: TStringField;
    QbackPc6: TStringField;
    QbackPc7: TStringField;
    QbackPc8: TStringField;
    QbackPc9: TStringField;
    QbackPc10: TStringField;
    QbackPc11: TStringField;
    QbackPc12: TStringField;
    QbackPc13: TStringField;
    QbackPc14: TStringField;
    QbackPc15: TStringField;
    QbackPc16: TStringField;
    QbackPc17: TStringField;
    QbackPc18: TStringField;
    QbackPc19: TStringField;
    QbackPc20: TStringField;
    QbackPc21: TStringField;
    QbackPc22: TStringField;
    QbackPc23: TStringField;
    QbackPc24: TStringField;
    QbackCli1: TStringField;
    QbackCli2: TStringField;
    QbackCli3: TStringField;
    QbackCli4: TStringField;
    QbackCli5: TStringField;
    QbackCli6: TStringField;
    QbackCli7: TStringField;
    QbackCli8: TStringField;
    QbackCli9: TStringField;
    QbackCli10: TStringField;
    QbackCli11: TStringField;
    QbackCli12: TStringField;
    QbackCli13: TStringField;
    QbackCli14: TStringField;
    QbackCli15: TStringField;
    QbackCli16: TStringField;
    QbackCli17: TStringField;
    QbackCli18: TStringField;
    QbackCli19: TStringField;
    QbackCli20: TStringField;
    QbackCli21: TStringField;
    QbackCli22: TStringField;
    QbackCli23: TStringField;
    QbackCli24: TStringField;
    QbackT1: TStringField;
    QbackT2: TStringField;
    QbackT3: TStringField;
    QbackT4: TStringField;
    QbackT5: TStringField;
    QbackT6: TStringField;
    QbackT7: TStringField;
    QbackT8: TStringField;
    QbackT9: TStringField;
    QbackT10: TStringField;
    QbackT11: TStringField;
    QbackT12: TStringField;
    QbackT13: TStringField;
    QbackT14: TStringField;
    QbackT15: TStringField;
    QbackT16: TStringField;
    QbackT17: TStringField;
    QbackT18: TStringField;
    QbackT19: TStringField;
    QbackT20: TStringField;
    QbackT21: TStringField;
    QbackT22: TStringField;
    QbackT23: TStringField;
    QbackT24: TStringField;
    QbackNome1: TStringField;
    QbackNome2: TStringField;
    QbackNome3: TStringField;
    QbackNome4: TStringField;
    QbackNome5: TStringField;
    QbackNome6: TStringField;
    QbackNome7: TStringField;
    QbackNome8: TStringField;
    QbackNome9: TStringField;
    QbackNome10: TStringField;
    QbackNome11: TStringField;
    QbackNome12: TStringField;
    QbackNome13: TStringField;
    QbackNome14: TStringField;
    QbackNome15: TStringField;
    QbackNome16: TStringField;
    QbackNome17: TStringField;
    QbackNome18: TStringField;
    QbackNome19: TStringField;
    QbackNome20: TStringField;
    QbackNome21: TStringField;
    QbackNome22: TStringField;
    QbackNome23: TStringField;
    QbackNome24: TStringField;
    QbackCod1: TStringField;
    QbackCod2: TStringField;
    QbackCod3: TStringField;
    QbackCod4: TStringField;
    QbackCod5: TStringField;
    QbackCod6: TStringField;
    QbackCod7: TStringField;
    QbackCod8: TStringField;
    QbackCod9: TStringField;
    QbackCod10: TStringField;
    QbackCod11: TStringField;
    QbackCod12: TStringField;
    QbackCod13: TStringField;
    QbackCod14: TStringField;
    QbackCod15: TStringField;
    QbackCod16: TStringField;
    QbackCod17: TStringField;
    QbackCod18: TStringField;
    QbackCod19: TStringField;
    QbackCod20: TStringField;
    QbackCod21: TStringField;
    QbackCod22: TStringField;
    QbackCod23: TStringField;
    QbackCod24: TStringField;
    procedure QuserBeforeOpen(DataSet: TDataSet);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DMEscola: TDMEscola;

implementation

{$R *.DFM}

procedure TDMEscola.QuserBeforeOpen(DataSet: TDataSet);
begin
   if not Session.IsAlias('SAE') then
   begin
      Session.AddStandardAlias('SAE','C:\LAN Server\Tabelas', 'PARADOX');
      Session.SaveConfigFile;
   end;
end;

end.
